package com.bolang.onlycode.demo.juc;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class SingleThreadWebServer {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(80);
        while (true){
            Socket connection=serverSocket.accept();
            handleRequest(connection);
        }


    }
    private static void handleRequest(Socket connection){
        // 处理请求逻辑
    }
}
